<?php foreach ($comments as $comment): ?>
    <div id="photo-commment-<?php echo $comment["Comment"]["id"]; ?>" class="comment">
        <p><a href="<?php echo BASE_PATH; ?>/users/view/<?php echo $comment["Comment"]["author_user_id"]; ?>"><?php echo $comment["User"]["name"]; ?></a></p>
        <p><?php echo $comment["Comment"]["content"]; ?></p>
    <?php if (($this->session->get("user_id") == $comment["Comment"]["author_user_id"]) || ($this->session->get("role_id") == 1)): ?>
        <p><a href="#" onclick="delete_comment(<?php echo $photo_id; ?>, <?php echo $comment["Comment"]["id"]; ?>); return false;">(delete)</a></p>
    <?php endif ?>
    </div>
<?php endforeach ?>